package org.etnaframework.module.redis;

/**
 * {@link RedisTemplate}链接配置信息
 *
 * @author jasyaf
 * @since 2023-11-15
 */
public class RedisTemplateFactoryConfig {

    private String host;

    private int port;

    private String password;

    /**
     * 是否启用SSL连接
     */
    private boolean useSsl;

    /**
     * redis分库分了多少个，默认16个，根据实际情况设置
     */
    private int totalDbNum = 16;

    /**
     * redis连接/操作超时时间配置（两个参数放一起配置，取相同值），单位毫秒
     */
    private int timeoutMs;

    /**
     * 连接池：最大连接数
     */
    private int poolMaxTotal;

    /**
     * 连接池：最大空闲数
     */
    private int poolMaxIdle;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public boolean getUseSsl() {
        return useSsl;
    }

    public void setUseSsl(boolean useSsl) {
        this.useSsl = useSsl;
    }

    public int getTotalDbNum() {
        return totalDbNum;
    }

    public void setTotalDbNum(int totalDbNum) {
        this.totalDbNum = totalDbNum;
    }

    public int getTimeoutMs() {
        return timeoutMs;
    }

    public void setTimeoutMs(int timeoutMs) {
        this.timeoutMs = timeoutMs;
    }

    public int getPoolMaxTotal() {
        return poolMaxTotal;
    }

    public void setPoolMaxTotal(int poolMaxTotal) {
        this.poolMaxTotal = poolMaxTotal;
    }

    public int getPoolMaxIdle() {
        return poolMaxIdle;
    }

    public void setPoolMaxIdle(int poolMaxIdle) {
        this.poolMaxIdle = poolMaxIdle;
    }
}
